import axios from 'axios';
import { req,upimgdata } from './axiosFun';
/**
 * 登陆
 */
 export const UserLand = (data = {}) => { return req("post", "/Login/login", data) };
/**
 * 验证码
 */
 export const VerificationImg = (data = {}) => { return req("post", "/Login/verify", data) };
/**
 * 文件上传
 */
 export const FileUpload = (file) => { return upimgdata(file) };
/**
 * 系统管理
 **/
// 系统管理-基本设置-查询
export const BasicSettingsList = (data = {}) => { return req("post", "/Index/config_list", data) };
// 系统管理-基本设置-保存&修改
export const BasicSettingsSave = (data = {}) => { return req("post", "/Index/config", data) };
/**
 * 管理员
 */
// 系统管理-管理员-查询
export const AdministratorsList = (data = {}) => { return req("post", "/User/index", data) };
// 系统管理-管理员-保存&修改
export const AdministratorsSave = (data = {}) => { return req("post", "/User/save_user", data) };
// 系统管理-管理员-状态修改
export const AdministratorsStateSave = (data = {}) => { return req("post", "/User/change_status?id=" + data) };
// 系统管理-管理员-删除
export const AdministratorsStateDelete = (data = {}) => { return req("post", "/User/del_user?id=" + data) };
/**
 * 轮播管理
 */
// 轮播管理-查询
export const RotationList = (data = {}) => { return req("post", "/Banner/index", data) };
// 轮播管理-保存&修改
export const RotationSave = (data = {}) => { return req("post", "/Banner/save_banner", data) };
// 轮播管理-是否显示
export const RotationStateSave = (data = {}) => { return req("post", "/Banner/change_status?id=" + data) };
// 轮播管理-删除
export const RotationStateDelete = (data = {}) => { return req("post", "/Banner/del_banner?ids=" + data) };
/**
 * 友情链接
 */
// 友情链接-查询
export const LinksList = (data = {}) => { return req("post", "/Links/index", data) };
// 友情链接-保存&修改
export const LinksSave = (data = {}) => { return req("post", "/Links/save_link", data) };
// 友情链接-状态修改
export const LinksStateSave = (data = {}) => { return req("post", "/Links/change_status?id=" + data) };
// 友情链接-删除
export const LinksStateDelete = (data = {}) => { return req("post", "/Links/del_link?ids=" + data) };
/**
 * 留言面板
 */
// 留言面板-查询
export const LeavingMessageList = (data = {}) => { return req("post", "/Links/index", data) };
// 留言面板-保存&修改
export const LeavingMessageSave = (data = {}) => { return req("post", "/Links/save_link", data) };
// 留言面板-状态修改
export const LeavingMessageStateSave = (data = {}) => { return req("post", "/Links/change_status?id=" + data) };
// 留言面板-删除
export const LeavingMessageStateDelete = (data = {}) => { return req("post", "/Links/del_link?id=" + data) };
/**
 * 栏目管理
 */
// 栏目管理-查询
export const CategoryList = (data = {}) => { return req("post", "/Category/index", data) };
// 栏目管理-保存&修改
export const CategorySave = (data = {}) => { return req("post", "/Category/save_cate", data) };
// 栏目管理-模型
export const CategoryModel = (data = {}) => { return req("post", "/Category/model", data) };
// 栏目管理-状态修改
export const CategoryStateSave = (data = {}) => { return req("post", "/Category/change_status?id=" + data) };
// 栏目管理-删除
export const CategoryDelete = (data = {}) => { return req("post", "/Category/del_category?id=" + data) };
/**
 * 文章管理
 */
// 文章管理-查询
export const ArticleList = (data = {}) => { return req("post", "/News/index", data) };
// 文章管理-保存&修改
export const ArticleSave = (data = {}) => { return req("post", "/News/save_news", data) };
// 文章管理-模型分类
export const ArticleModel = (data = {}) => { return req("post", "/News/model_cate", data) };
// 文章管理-是否显示
export const ArticleShowState = (data = {}) => { return req("post", "/News/change_status?id=" + data) };
// 文章管理-是否置顶
export const ArticleToState = (data = {}) => { return req("post", "/News/change_top?id=" + data) };
// 文章管理-删除
export const ArticleDelete = (data = {}) => { return req("post", "/News/del_news?ids=" + data) };
/**
 * 商品管理
 */
// 商品管理-查询
export const CommodityList = (data = {}) => { return req("post", "/Goods/index", data) };
// 商品管理-模型分类
export const CommodityModel = (data = {}) => { return req("post", "/Goods/model_cate", data) };
// 商品管理-保存&修改
export const CommoditySave = (data = {}) => { return req("post", "/Goods/save_goods", data) };
// 商品管理-是否显示
export const CommodityShowState = (data = {}) => { return req("post", "/Goods/change_status?id=" + data) };
// 商品管理-是否置顶
export const CommodityToState = (data = {}) => { return req("post", "/Goods/change_top?id=" + data) };
// 商品管理-新品
export const CommodityNew = (data = {}) => { return req("post", "/Goods/change_new?id=" + data) };
// 商品管理-删除
export const CommodityDelete = (data = {}) => { return req("post", "/Goods/del_goods?ids=" + data) };
/**
 * 留言管理
 **/
// 留言管理-查询
export const MessageList = (data = {}) => { return req("post", "/Message/index", data) };

export default {
    FileUpload,
    BasicSettingsList,
    BasicSettingsSave,
    AdministratorsList,
    AdministratorsSave,
    AdministratorsStateSave,
    AdministratorsStateDelete,
    RotationList,
    RotationSave,
    RotationStateSave,
    RotationStateDelete,
    LinksList,
    LinksSave,
    LinksStateSave,
    LinksStateDelete,
    CategoryList,
    CategorySave,
    CategoryModel,
    CategoryStateSave,
    CategoryDelete,
    ArticleList,
    ArticleSave,
    ArticleModel,
    ArticleShowState,
    ArticleToState,
    ArticleDelete,
    CommodityList,
    CommodityModel,
    CommoditySave,
    CommodityShowState,
    CommodityToState,
    CommodityNew,
    CommodityDelete,
    UserLand,
    VerificationImg,
    MessageList,
}